const information = document.getElementById('info')
const title = document.getElementById('title')
const switer = document.getElementById('switcher')
information.innerText = `This app is using Chrome (v${versions.chrome()}), Node.js (v${versions.node()}), and Electron (v${versions.electron()})`

document.addEventListener('drop', (e) => {
  e.preventDefault();
  e.stopPropagation();

  for (const f of e.dataTransfer.files) {
    console.log('File(s) you dragged here: ', f.path)
    f.text().then(async(text) => {
      information.innerHTML = await window.versions.message(text);
      title.innerText = f.name

    })
  }
});
document.addEventListener('dragover', (e) => {
  e.preventDefault();
  e.stopPropagation();
});

switer.addEventListener('click', ()=>{

})
